#pragma	once

namespace	MomogenkyouSystem	{

class	Vertex  
{
	friend	class GraphicsSystem;
protected:
	static	const	VERTEXELEMENT		m_VertexElements[];
	static			VERTEXDECLARE		m_VertexDelaration;
	static	void	InitializeVertexDeclaration();
public:
	static	const	size_t				FVF;
	
	static	inline	VERTEXDECLARE		Declaration()	{	return	m_VertexDelaration;	}

	ALIGN(16)
	float4								Position;
	float2								TexCoord;
	float4								Color;
	
	Vertex()
		:	Position(0, 0, 0, 1), TexCoord(0, 0), Color(1, 1, 1, 1)
	{
	}

	Vertex(	const float4 & inPosition)
		:	Position(inPosition), TexCoord(0, 0), Color(1, 1, 1, 1)
	{
	}

	Vertex(	const float4 &  inPosition, 
			const float2 & inTexCoord)
		:	Position(inPosition), TexCoord(inTexCoord), Color(1, 1, 1, 1)
	{
	}

	Vertex(	const float4 &  inPosition, 
			const float2 &  inTexCoord, 
			const float4 & inColor)
		:	Position(inPosition), TexCoord(inTexCoord),	Color(inColor)
	{
	}

	Vertex(const float & x, const float & y, const float & z)
		:	Position(x, y, z, 1), TexCoord(0, 0), Color(1, 1, 1, 1)
	{
	}

	Vertex(	const float & x, const float & y, const float & z, 
			const float & u, const float & v)
		:	Position(x, y, z, 1), TexCoord(u, v), Color(1, 1, 1, 1)
	{
	}

	Vertex(	const float & x, const float & y, const float & z, 
			const float & u, const float & v,
			const float & r, const float & g, const float & b, const float & a)
		:	Position(x, y, z, 1), TexCoord(u, v), Color(r, g, b, a)
	{
	}



};

}